package algorithm.encode.huffman;

public class HuffmanTreeNode {
    String code;
    int weight;
    String data;
    HuffmanTreeNode left;
    HuffmanTreeNode right;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public int getWeight() {
        return weight;
    }

    public void setWeight(int weight) {
        this.weight = weight;
    }

    public String getData() {
        return data;
    }

    public void setData(String data) {
        this.data = data;
    }

    public HuffmanTreeNode getLeft() {
        return left;
    }

    public void setLeft(HuffmanTreeNode left) {
        this.left = left;
    }

    public HuffmanTreeNode getRight() {
        return right;
    }

    public void setRight(HuffmanTreeNode right) {
        this.right = right;
    }

    @Override
    public String toString() {
        return "HuffmanTreeNode{" +
                "code='" + code + '\'' +
                ", weight=" + weight +
                ", data='" + data + '\'' +
                ", left=" + left +
                ", right=" + right +
                '}';
    }
}
